﻿namespace CodeProject.Podium.PowerPoint
{
    using System;
    using System.Windows.Forms;
    using CodeProject.Podium.PowerPoint.Service;

    public partial class DebugPane : UserControl
    {
        public DebugPane()
        {
            InitializeComponent();
        }

        private void DebugPane_Load(object sender, EventArgs e)
        {
            RegistrationService.Subscribed += new EventHandler<RegistrationService.SubscriptionEventArgs>(RegistrationService_Subscribed);
        }

        void RegistrationService_Subscribed(object sender, RegistrationService.SubscriptionEventArgs e)
        {
            this.Invoke(new Action(() => { listBox1.Items.Add(e.ChannelUri); }));
        }
    }
}
